/**
*      author: Y_Yao
*      created: 2024-11-22 10:27:31
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
const int N = 5e5 + 7;
int a[N],ret[N];
int n,k;

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    cin >> n >> k;
    for(int i = 1;i <= n;i++)
    {
        cin >> a[i];
    }

    int count = 0;
    int flag = 1;
    int j = 1;
    for(int i = 1;i <= n - 1;i++)
    {
        if(a[i] > a[i+1])
        {
            ret[j++] = i;
            a[i] = a[i+1] + k;
            a[i+1] = a[i];
            count++;
        }
        if(count > 500000) 
        {
            flag = 0;
            break;
        }
    }

    if(flag == 0) cout << "No" << endl;
    else
    {
        cout << "Yes" << endl;
        cout << count << endl;
        for(int i = 1;i < j ;i++)
        {
            cout << ret[i] << " ";
        }
    }
    return 0;
}